ANP – Automatic notice production

1 Introduction[//]

Apart from the standard way of generating notices via AFO 451/452, there is functionality to provide an automated process to create overdue and reservation notices.

Any email notices created will be automatically sent before the output of notices to be printed takes place. The notice files created for printing may then be transferred to a final destination using any script provided by the library. This transfer is most likely to be via Secure FTP to a print server.

The regular overdue and reservation generation process is not affected by this, except that two additional transparent steps will run at the end of the notice generation. The first step will create the appropriate output files, based on the corresponding “stored” parameter settings for the output process. The second step will send the output files to the print server if required. In reality the first step will run the output process once for each set of stored notice parameters. This step will also use mechanisms that exist to direct the output to a named file on the Vubis database server. As part of this special processing the output files will be named according to a prescribed naming convention. The second step will transfer the files to a final destination should this be required using a transfer script provided by the library.

This processing will not directly interact with the regular printing from AFO 452. Such notices may be printed in the normal way as well.

Note

This functionality only applies to overdues and reservation notices.

2 Parameters[//]

The parameters associated with this functionality are maintained via AFO 483 – Circulation notice parameters – Notices – Automatic notice production parameters.

2.1 General[//]

These general parameter settings cover the “shared” settings used by the automatic notice production feature. After selecting this menu option, an input form will be displayed:

Fields on the form

Automatic notice production in use: This parameter is used to either turn on or off the entire automated notice production process. Note that each defined notice run may also be activated and deactivated individually should this be needed.

Batch number: This batch number will be used as part of the file name. This number will be automatically incremented following each run. If batch numbering is not required simply leave this field “blank”.

File transfer script: The field contains the location and name of the transfer script used to transfer the notice files to their final destination. Leave this field “blank” if the notice files are to remain at their current location. (See “Output file path directory” parameter below).

Output file path directory: This shows the directory path where ALL notice files created automatically will be stored.

Trigger file name: This is the name of the trigger file to be created as part of the transfer process if required. This file will be created as a zero length file in the same output directory as the notice files. It will then be transferred to the same destination as the notice files if a transfer script is being used, to indicate that all the created files have successfully transferred. Note that the date and/or the batch sequence number may be entered as part of the file name using the same formatting rules as that used by the file name and extension fields.

2.2 Overdues[//]

In this section the rules for automatic production of overdue notices can be defined. After selecting this option a summary screen is displayed:

Each rule is identified by the first 2 column values and the pair of values are combined to form a unique “key” to the stored parameter values for each rule. There can be as many rules defined are required and these my each be marked as “in use “ or “not in use” for each notice output type (printing or email).

Options on the screen

Modify: Select a line and then this option to modify the parameters of the selected rule.

Delete type:Select a line and then this option to delete the selected rule.

New type: Choose this option to create a new rule. An input form will be displayed:

The form is presented in two sections.
The first section is used to define the identifier, run number and output file naming to be used for this rule and also the current status of the rule. The second section is used to select the notices for each run.

Fields on the form

Identifier & Run number: Used to identify the rule on the AFO 451/452 summary screen, shown in the contact method field. Note that the pair of values will be combined to form a unique key.

Description: A free format text field used to describe the notice rule set.

File name: File name to be used when creating the output notices for the rule. Note that if the date, time or batch sequence number will be included in the file name, they should be included as part of the name inserted in the appropriate point by using the following format:

·                Date                                “#ddmmyyyy#”

-                 Where yyyy = year; mm=month; dd=day

·                Time                                “[hhmmss]” or “[hhmm]”

-                 Where hh=hours; mm=minutes;       ss=seconds

·                Batch sequence   “{nnn}”

-                 Where the nnn characters entered will be used to determine the batch number length. The batch number will be padded to this length with leading zeroes.

Examples

·                Overdue#ddmmyyyy#: would produce a name similar to “Overdue05112008”

·                Over#ddmmyyyy#due: Would produce a name similar to “Over05112008due”

·                Overdue{nnnnnn}D#yyyymmdd#_T[hhmm]:             Would produce a name similar to “Overdue012345D20081105_T1235” where the batch number number is 12345,  the date is 5th Nov 2008 and the time is 12:35.

File name extension: A free format text field used to define the file name extension should one be required. Note that the date and/or the batch sequence number may be entered in this field in the same format as that used by the file name field above.

Automatic printing: An “in use” status indicator used to activate the rule for automatic printing.

Automatic email: An “in use” status indicator used to activate the rule for automatic emailing.

The second section of the parameters have the same meaning as if entered via the manually run overdue notices output screen accessed via AFO 452 and is not explained in this document.

2.3 Reservations[//]

In this section the rules for automatic production of overdue notices can be defined. After selecting this option a summary screen is displayed:

Each rule is identified by the first 2 column values and the pair of values are combined to form a unique “key” to the stored parameter values for each rule. There can be as many rules defined are required and these my each be marked as “in use “ or “not in use” for each notice output type (printing or email).

Options on the screen

Modify: Select a line and then this option to modify the parameters of the selected rule.

Delete type:Select a line and then this option to delete the selected rule.

New type: Choose this option to create a new rule. An input form will be displayed:

The form is presented in two sections.
The first section is used to define the identifier, run number and output file naming to be used for this rule and also the current status of the rule. The second section is used to select the notices for each run.

Fields on the form

Identifier & Run number: Used to identify the rule on the notice print job summary screen and shown in the contact method field. Note that the pair of values will be combined to form a unique key.

Description: A free format text field used to describe the notice rule set.

File name: File name to be used when creating the output notices for the rule. Note that if the date, time or batch sequence number will be included in the file name they should be included as part of the name inserted in the appropriate point by using the following format:

·                Date                                “#ddmmyyyy#”

-                 Where yyyy = year; mm=month; dd=day

·                Time                                “[hhmmss]” or “[hhmm]”

-                 Where hh=hours; mm=minutes;       ss=seconds

·                Batch sequence   “{nnn}”

-                 Where the nnn characters entered will be used to determine the batch number length. The batch number will be padded to this length with leading zeroes.

Examples

·                Reserve#ddmmyyyy#: would produce a name similar to “Reserve05112008”

·                Res#ddmmyyyy#notice: Would produce a name similar to “Res05112008notice”

·                Res{nnnnnn}D#yyyymmdd#_T[hhmm:        Would produce a name similar to “Res012345D20081105_T1235” where the batch number number is 12345,  the date is 5th Nov 2008 and the time is 12:35.

File name extension: A free format text field used to define the file name extension should one be required. Note that the date and/or the batch sequence number may be entered in this field in the same format as that used by the file name field above.

Automatic printing: A simply “in use” status indicator used to activate the rule for automatic printing.

Automatic email: A simply “in use” status indicator used to activate the rule for automatic emailing.

The second section of the parameters have the same meaning as if entered via the manually run overdue notices output screen accessed via AFO 452 and is not explained in this document.

3 Start / Stop signs[//]

The notices produced for each borrower must have a “start sign” output at the beginning of the first page and a “stop sign” output at the end of the final page.

The required “start” and “stop” signs to be output for each borrower notice should be entered as part of the standard notice layout definitions. Note that the required characters should be entered as part of the “free text” shown at the beginning and end of the notice accessed via AFO 483 – Circulation Notice parameters – SSP format for each notice format defined.

For each borrower category / notice type combination set up the required free texts:

Example

This would print “_start_” at the top of the first page output for each printed borrower notice

Example

Would output “___end___” at the end of the text shown on the last page of the borrower notice.

The automatic process follows the same rules for outputting this text as used by the “manual” printing so the required output can be established by testing the notice format using the manual processing route.

4 Notice generation[//]

AFO 451 is used to generate the two notice types required as scheduled tasks (overdues and reservations). Each task will first select all the notices eligible for printing and then in each case process the selected notices using the notice production parameters to create the desired output files.

The notices will be produced whenever AFO 451 is run. This can be a Vubis scheduled process or a manual run. Any notices to be sent via email will be dealt with first.

Any files containing notices to be printed will be initially created in a specified directory on the main server before they are transferred to their final destination should a transfer script be in use. This location is determined by a parameter in AFO 483 – Automatic notice production parameters – General.

The set of notices will be marked as “printed” automatically (with the date in the 5th column of the summary screen of AFO 451) if all the notice sets appear to be successfully created and transferred to the remote destination. If no transfer script is being used then the notices will be marked as printed once they have been successfully created. This will then allow the next night's notice generation to proceed automatically.

Extra text may be displayed in the final column (Contact method and no of notices) to indicate the fact that the output has been processed in this way. The text, in the format “[PS 14/01/2008]”, will be appended to the rest of the information (PS = short for “print services” followed by the date generated).

This may be followed by an indication that the file transfer failed for some reason after the file creation has finished. The information text will take the form “(Failed)”and this should be taken to mean that one or more notice files failed to transfer to the print server for reasons unknown and will require manual intervention to resolve any issues found.

Example

PS 02/03/2008
Indicates that the files were created and transferred on the 2nd of March 2008.

PS 02/03/2008 (Failed)
Indicates that the files were created on the 2nd of March 2008 but NOT all transferred for some reason.

This will be followed by a summary text message showing the number of files created for each run identifier.

This will be in the form “E:n,m S:n,m T:n,m” for overdues (where E,S and T are the run identifiers and n,m indicates the presence of overdue files in each case – not the number of overdue notices) and “E S T” for reservations (where E, S and T are the run identifiers). Should there be no notices for a location their location will be omitted from the text string.

An example of this may be “E:1,2 T:1” for overdues would indicate that there were 1st and 2nd overdues for identifier “E” , 1st overdues only for identifier “T” and nothing for any other identifier.

5 Notice file transfer[//]

The final stage of this processing is to allow the newly create notice files to be transferred to a final destination. This may well be to a print server or some such location. The transfer will be achieved using a script provided by the library if required.

If a transfer is to take place a “trigger” file will also be created and transferred to indicate that the transfer process has completed successfully.

The script being used to handle the file transferring must allow for the passing of a single argument being the full path name of the file(s) to be sent. This script will be called automatically by the process for each of the notice output files created. After all the files have been transferred the “trigger” file will be created and transferred to indicate that the process has finished. The script should return either a “successful” or “failed” status following each call to allow the Vubis process to determine that the transfer has taken place.

Filenames follow a specific format as defined in the automatic notice running parameters described ealier.

While Vubis will know about the state of files (either sent or failed) there will be no prevision made for retry capability. The notice production is a 2 step operation. First the files will be created and if there is a problem with the creation then the current online creation routine will abort BEFORE it gets to the file transfer. Assuming that the creation has finished successfully each file will be transferred to the print server. If any file fails to transfer the transfer process will abort and the absence of the trigger file on the print server will be taken to mean that something went wrong with the transfer side of things and should be investigated.

Each notice file will be transferred one at a time. If all files transfer then the trigger file will be sent. If the trigger file fails to transfer for some reason this will result in a "transfer failed" status shown on the Vubis summary screens of AFO 451 / AFO 452 in the same manner as notice file failures. If the trigger file transfer is successful then the screen display will show that all is well.

The “Batch” number element of each file name will be maintained automatically within Vubis and will take the same value for all files created on any one run of the notice file creation process. It will be incremented each time a run is carried out. The batch number, if defined, will become part of either the file name or file name extension depending on where the number is required. (See file name / file name extension parameter formatting).

5.1 File transfer script[//]

A generic transfer script must be provided by the library if the notice files are to be automatically transferred elsewhere. This script will expect a single input parameter containing the full path and file name. The script will simply transfer each file individually using some such method as SFTP to the required destination, which would usually be a print server. If the transfer fails the script will exit and provide a non-zero exit code, which Caché can then pick up and handle as required.


·                     Document control - Change History

 

Version

Date

Change description

Author

1.0

January 2009

creation